package com.heima.user.controller;


import com.heima.model.common.dtos.PageResponseResult;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.ApUserRealnameDto;
import com.heima.user.service.IApUserRealnameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * APP实名认证信息表 前端控制器
 * </p>
 *
 * @author zqc
 * @since 2024-08-21
 */
@RestController
@RequestMapping("/api/v1/auth")
public class ApUserRealnameController {
    @Autowired
    private IApUserRealnameService iApUserRealnameService;

    /**
     * 作者认证列表
     *
     * @param dto
     * @return
     */
    @PostMapping("/list")
    public PageResponseResult authList(@RequestBody ApUserRealnameDto dto) {
        return iApUserRealnameService.authList(dto);
    }

    /**
     * 驳回申请
     * @param dto
     * @return
     */
    @PostMapping("/authFail")
    public ResponseResult authFail(@RequestBody ApUserRealnameDto dto){
        return iApUserRealnameService.authFail(dto);
    }

    /**
     * 申请通过
     * @param dto
     * @return
     */
    @PostMapping("/authPass")
    public ResponseResult authPass(@RequestBody ApUserRealnameDto dto){
        return iApUserRealnameService.authPass(dto);
    }
}
